<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>个人资料</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="teleuserPhone=no">
	<link rel="stylesheet" href="${s.base}/js/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${s.base}/css/base/base.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form layui-row">
	<input type="hidden" value="${currentUser.id}" name="id" />
	<div class="layui-col-md3 layui-col-xs12 user_right" style="width: 20%; margin-left: 5%;">
		<div class="layui-upload-list">
			<!--单图片开始-->
			<div class="layui-input-block cy-uploadpic-ctn" id="userLogo"  style=" border: 1px solid #8a8a8a; float:left;margin:10px 0!important;position:relative; width: 180px; height: 180px;">
			</div>
			<!--单图片结束-->
		</div>
	</div>
	<div class="layui-col-md6 layui-col-xs12">
		<div class="layui-form-item">
			<label class="layui-form-label">登录名</label>
			<div class="layui-input-block">
				<input type="text" value="${currentUser.loginName}" id="loginName" disabled class="layui-input layui-disabled">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">所属部门:</label>
			<div class="layui-input-block">
				<input type="text" value="${sysDepart.name}" disabled class="layui-input layui-disabled">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">所属角色:</label>
			<div class="layui-input-block">
				<input type="text" value="${sysRole.roleName}" disabled class="layui-input layui-disabled">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">所属级别:</label>
			<div class="layui-input-block">
				<input type="text" value="" id="userType" disabled class="layui-input layui-disabled">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">用户姓名</label>
			<div class="layui-input-block">
				<input type="text" value="${currentUser.userName}" name="userName" id="userName"  lay-verify="required" class="layui-input realName">
			</div>
		</div>
		<div class="layui-form-item" pane="">
			<label class="layui-form-label">性别</label>
			<div class="layui-input-block userSex">
				<select class="form-control" name="userSex" lay-verify="required" id="userSex"></select>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">手机号码</label>
			<div class="layui-input-block">
				<input type="tel" value="${currentUser.userPhone}" name="userPhone" placeholder="请输入手机号码" lay-verify="userPhone" class="layui-input userPhone">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">账号余额</label>
			<div class="layui-input-block">
				<input type="text" value="${currentUser.money}元" disabled class="layui-input layui-disabled">
			</div>
		</div>
		<!--<div class="layui-form-item">
			<label class="layui-form-label">出生年月</label>
			<div class="layui-input-block">
				<input type="text" value="${currentUser.brithday}" placeholder="请输入出生年月" lay-verify="userBirthday" readonly class="layui-input brithday">
			</div>
		</div>
		<div class="layui-form-item userAddress">
			<label class="layui-form-label">家庭住址</label>
			<div class="layui-input-inline">
				<select name="province" lay-filter="province" class="province">
					<option value="${currentUser.province}">${currentUser.province!"请选择省"}</option>
				</select>
			</div>
			<div class="layui-input-inline">
				<select name="city" lay-filter="city" disabled>
					<option value="${currentUser.city}">${currentUser.city!"请选择市"}</option>
				</select>
			</div>
			<div class="layui-input-inline">
				<select name="area" lay-filter="area" disabled>
					<option value="${currentUser.area}">${currentUser.area!"请选择县/区"}</option>
				</select>
			</div>
		</div>
		<div class="layui-form-item userAddress">
			<label class="layui-form-label">家庭住址</label>
			<div class="layui-input-inline">
				<select name="province" data-value="${currentUser.province}" lay-filter="province" class="province">
					<option value="">请选择市</option>
				</select>
			</div>
			<div class="layui-input-inline">
				<select name="city" data-value="${currentUser.city}" lay-filter="city" class="city" disabled>
					<option value="">请选择市</option>
				</select>
			</div>
			<div class="layui-input-inline">
				<select name="area" data-value="${currentUser.area}" lay-filter="area" class="area" disabled>
					<option value="">请选择县/区</option>
				</select>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">邮箱</label>
			<div class="layui-input-block">
				<input type="text" value="${currentUser.email}" placeholder="请输入邮箱" lay-verify="email" class="layui-input email">
			</div>
		</div>-->
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="submitBtn">立即提交</button>
			</div>
		</div>
	</div>
</form>
<script type="text/javascript" src="${s.base}/js/layui/layui.js"></script>
<script type="text/javascript" src="${s.base}/js/base/base.js"></script>
<script type="text/javascript">layui.use(['form', 'jquery', 'baseUtil', 'pageUtil','fileUtil'],
    function() {
        var form = layui.form,
            $ = layui.jquery,
            fileUtil = layui.fileUtil,
            baseUtil = layui.baseUtil,
            pageUtil = layui.pageUtil;
        //单图片上传
        fileUtil.uploadImageNoSave('userLogo',"sysUser/logo","${currentUser.userLogo}");
        pageUtil.initDict("base_sex,base_user_type",
            function(dictData) {
            	$("#userType").val(pageUtil.aceeptDictContentName(dictData,"base_user_type",'${currentUser.userType}'));
                pageUtil.showDict($("#userSex"), pageUtil.aceeptDictContentList(dictData, "base_sex"), "", '${currentUser.userSex}');
            });
        form.on('submit(submitBtn)',
            function(data) {
                baseUtil.postMethodResult("/sysUser/updateNews", data.field,
                    function(result) {
                      window.location.reload();
                    });
                return false;
            });
    });</script>
</body>
</html>